package com.heima.controller;


import com.heima.entity.User;
import com.heima.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
@Api(tags = "用户相关接口")
public class UserController {

    @Autowired
    private UserService userService;


    //    @TestAnno
    @ApiOperation("查找所有用户接口")
    @GetMapping("/test")
    public List<User> selectAll() {
        return userService.selectAll();
    }
}
